package io.hx.modules.patient.service.impl;

import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.hx.common.utils.PageUtils;
import io.hx.common.utils.Query;

import io.hx.modules.patient.dao.PatientUserDao;
import io.hx.modules.patient.entity.PatientUserEntity;
import io.hx.modules.patient.service.PatientUserService;


@Service("PatientUserService")
public class PatientUserServiceImpl extends ServiceImpl<PatientUserDao, PatientUserEntity> implements PatientUserService {
    @Autowired
    PatientUserDao patientUserDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PatientUserEntity> page = this.page(
                new Query<PatientUserEntity>().getPage(params),
                new QueryWrapper<PatientUserEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public Integer queryUserAll() {
        return patientUserDao.queryUserAll();
    }

    @Override
    public PatientUserEntity queryById(Integer userId) {
        return patientUserDao.selectById(userId);
    }

}
